﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_DKKhachHang : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CboKhuVuc")]
        private ComboBox _CboKhuVuc;
        [AccessedThroughProperty("CboLoaiKhachHang")]
        private ComboBox _CboLoaiKhachHang;
        [AccessedThroughProperty("CboNganh")]
        private ComboBox _CboNganh;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label15")]
        private Label _Label15;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        private string cFrmKhoa;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private clsDMDoiTuong objDMKH;

        public Frm_DKKhachHang()
        {
            base.KeyDown += new KeyEventHandler(this.Frm_DKKhachHang_KeyDown);
            base.Load += new EventHandler(this.Frm_DKKhachHang_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmKhoa = "";
            this.objDMKH = new clsDMDoiTuong();
            this.InitializeComponent();
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            string strConditions = "";
            strConditions = " AND CharIndex('C',DT.Loai) <> 0 ";
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKhuVuc.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
            {
                strConditions = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strConditions + " AND DT.KhoaKhuVuc = '", this.CboKhuVuc.SelectedValue), "' "));
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNganh.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
            {
                strConditions = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strConditions + " AND DT.KhoaNganh = '", this.CboNganh.SelectedValue), "' "));
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiKhachHang.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
            {
                strConditions = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(strConditions + " AND DT.KhoaLoaiKhachHang = '", this.CboLoaiKhachHang.SelectedValue), "' "));
            }
            DataTable dataPrint = this.objDMKH.GetDataPrint(strConditions);
            Rpt_DMKhachHang hang = new Rpt_DMKhachHang();
            try
            {
                hang.SetDataSource(dataPrint);
                if (modGeneral.H_LANGUAGE == "VIET")
                {
                    hang.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                }
                else
                {
                    hang.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                }
                hang.SetParameterValue(1, modGeneral.Tranlated("Địa chỉ", "") + ": " + modGeneral.H_ADDRESS);
                hang.SetParameterValue(2, modGeneral.Tranlated("M\x00e3 số thuế", "") + ": " + modGeneral.H_TAXCODE);
                hang.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                hang.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                hang.SetParameterValue(5, modGeneral.Tranlated("DANH MỤC KH\x00c1CH H\x00c0NG", ""));
                hang.SetParameterValue(6, modGeneral.Tranlated("STT", ""));
                hang.SetParameterValue(7, modGeneral.Tranlated("M\x00e3 KH", ""));
                hang.SetParameterValue(8, modGeneral.Tranlated("T\x00ean KH", ""));
                hang.SetParameterValue(9, modGeneral.Tranlated("Địa chỉ", ""));
                hang.SetParameterValue(10, modGeneral.Tranlated("Điện thoại", ""));
                hang.SetParameterValue(11, modGeneral.Tranlated(" Fax", ""));
                hang.SetParameterValue(12, modGeneral.Tranlated("Email", ""));
                hang.SetParameterValue(13, modGeneral.Tranlated("Ng\x00e0y .... th\x00e1ng .... năm ............", ""));
                hang.SetParameterValue(14, modGeneral.Tranlated("NGƯỜI LẬP", ""));
                hang.SetParameterValue(15, modGeneral.Tranlated("Trưởng đại diện", ""));
                hang.SetParameterValue(0x10, modGeneral.Tranlated("M\x00e3 số thuế", ""));
                MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = hang;
                MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                this.Cursor = Cursors.Default;
                MyProject.Forms.Frm_ViewReport.ShowDialog();
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                MessageBox.Show(exception.Message.ToString());
                ProjectData.ClearProjectError();
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_DKKhachHang_KeyDown(object sender, KeyEventArgs e)
        {
        }

        private void Frm_DKKhachHang_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                BuildComboModule.BuildCombo(this.CboKhuVuc, modGeneral.ListDanhMuc.KhuVuc, false, "", "");
                BuildComboModule.BuildCombo(this.CboNganh, modGeneral.ListDanhMuc.NganhKinhDoanh, false, "", "");
                BuildComboModule.BuildCombo(this.CboLoaiKhachHang, modGeneral.ListDanhMuc.LoaiKhachHang, false, "", "");
                this.Cursor = Cursors.Default;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_DKKhachHang));
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.GroupBox1 = new GroupBox();
            this.CboLoaiKhachHang = new ComboBox();
            this.CboNganh = new ComboBox();
            this.CboKhuVuc = new ComboBox();
            this.Label15 = new Label();
            this.Label8 = new Label();
            this.Label13 = new Label();
            this.Panel1 = new Panel();
            this.GroupBox1.SuspendLayout();
            this.Panel1.SuspendLayout();
            this.SuspendLayout();
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            Point point = new Point(0x13b, 3);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            Size size = new Size(0x52, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 0x83;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(230, 3);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x51, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 130;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.CboLoaiKhachHang);
            this.GroupBox1.Controls.Add(this.CboNganh);
            this.GroupBox1.Controls.Add(this.CboKhuVuc);
            this.GroupBox1.Controls.Add(this.Label15);
            this.GroupBox1.Controls.Add(this.Label8);
            this.GroupBox1.Controls.Add(this.Label13);
            this.GroupBox1.Dock = DockStyle.Fill;
            point = new Point(0, 0);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(0x191, 0x88);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0x84;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "T\x00f9y chọn";
            this.CboLoaiKhachHang.FormattingEnabled = true;
            point = new Point(110, 0x4e);
            this.CboLoaiKhachHang.Location = point;
            this.CboLoaiKhachHang.Name = "CboLoaiKhachHang";
            size = new Size(0x114, 0x15);
            this.CboLoaiKhachHang.Size = size;
            this.CboLoaiKhachHang.TabIndex = 0x84;
            this.CboNganh.FormattingEnabled = true;
            point = new Point(110, 0x17);
            this.CboNganh.Location = point;
            this.CboNganh.Name = "CboNganh";
            size = new Size(0x114, 0x15);
            this.CboNganh.Size = size;
            this.CboNganh.TabIndex = 130;
            this.CboKhuVuc.FormattingEnabled = true;
            point = new Point(110, 0x33);
            this.CboKhuVuc.Location = point;
            this.CboKhuVuc.Name = "CboKhuVuc";
            size = new Size(0x114, 0x15);
            this.CboKhuVuc.Size = size;
            this.CboKhuVuc.TabIndex = 0x83;
            this.Label15.AutoSize = true;
            point = new Point(6, 0x52);
            this.Label15.Location = point;
            this.Label15.Name = "Label15";
            size = new Size(50, 13);
            this.Label15.Size = size;
            this.Label15.TabIndex = 0x87;
            this.Label15.Text = "Loại h\x00ecnh";
            this.Label8.AutoSize = true;
            point = new Point(6, 0x36);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x2f, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 0x86;
            this.Label8.Text = "Khu vực";
            this.Label13.AutoSize = true;
            point = new Point(6, 0x1b);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x27, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x85;
            this.Label13.Text = "Ng\x00e0nh";
            this.Panel1.BackColor = Color.Transparent;
            this.Panel1.Controls.Add(this.CmdCancel);
            this.Panel1.Controls.Add(this.CmdOK);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new Point(0, 0x88);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x191, 0x1f);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x85;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x191, 0xa7);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.GroupBox1);
            this.Controls.Add(this.Panel1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_DKKhachHang";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "BC-0034";
            this.Text = "IN DANH SACH KHACH HANG";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.Panel1.ResumeLayout(false);
            this.ResumeLayout(false);
        }

        internal virtual ComboBox CboKhuVuc
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKhuVuc;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboKhuVuc = value;
            }
        }

        internal virtual ComboBox CboLoaiKhachHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiKhachHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiKhachHang = value;
            }
        }

        internal virtual ComboBox CboNganh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboNganh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboNganh = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label15
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label15;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label15 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }
    }
}

